<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../css/bootstrap-grid.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/zoomify.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/zoomstyle.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>


    <style type="text/css">
        .member_info_top{
          background-color: #ffffff;
          height: 90px

        }

        .aui-btn-block{
          height: 2rem;
          line-height: 2.05rem;
        }

        *{
          -webkit-box-sizing: inherit;
                  box-sizing: inherit;
        }
        .top-container{
          -webkit-box-sizing: border-box;
                  box-sizing: border-box;
        }
        .aui-btn-info{
          background-color: #33375E !important;
        }

        .top-container {
          overflow: visible;
        }
        /*.member_info_top_div img{
          width: 60px
        }*/
    </style>
</head>
<body>
  <div id="blank" class="header">
      <div v-back.tapmode class="back"></div>
      <span class="title">群成员</span>
  </div>
<div id="app"  class="top-container" v-cloak >
  <div class="member_info_top" >
    <img v-image-resize="{src:memberinfo.portrait?memberinfo.portrait:'../res/tx00.jpg'}" style="float:left;width:80px;border-radius:20px;padding:10px;display:block">
    <div style="height:90px;line-height:90px;padding:0px 10px;float:left">{{memberinfo.nickname}}</div>
  </div>
  <div style="margin:20px 30px" >
  <div class="aui-btn aui-btn-info aui-btn-block" v-show="memberinfo.is_friend==0&&member_id!=uid" v-myclick="addfriends">加为好友</div>
  <div class="aui-btn aui-btn-info aui-btn-block" v-show="memberinfo.is_friend==1&&member_id!=uid" v-myclick="chat">发起会话</div>

  </div>
</div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script type="text/javascript" src="../../script/jquery.js"></script>
<script src="../../script/zoomify.min.js"></script>

<script type="text/javascript">
    var memberinfo;
    apiready = function () {
        api.parseTapmode();
        setBSImg();
        var uid = api.pageParam.uid;
        var clan_id = api.pageParam.group_id;
        new Vue({
  					el: '#blank'
  			});

        var data = {
            member_id: getPrefs('member_id'),
            another_id: uid,
            clan_id:clan_id
        };
        var callback = function (ret) {
            memberinfo = ret.content;
            initApp();
            api.parseTapmode();
            $('img').zoomify();
        };
        pinet.post(URL.getClanSingleInfo, data, callback);
    };

		function initApp() {
        vm = new Vue({
            el: '#app',
            data: {
                memberinfo: memberinfo,
                member_id:getPrefs('member_id'),
                uid:api.pageParam.uid
            },
            computed: {
            },
            methods: {
              addfriends:function(member_id){
                api.openWin({
                  reload : true,
                  name : 'verify',
                  url : '../user/verify.html',
                  pageParam : {
                    target_id : api.pageParam.uid,
                    target_type:1,
                    from_type:2
                  },
                  vScrollBarEnabled : false,
                });
              },
              chat:function () {
                api.openWin({
                  reload : true,
                  name : 'win_chat',
                  url : '../win/win_chat.html',
                  pageParam : {
                    id : memberinfo.member_im_id,
                    zh : memberinfo.nickname,
                    tx : memberinfo.portrait,
                    friend_id:memberinfo.member_id,
                    level_id:memberinfo.level_id,

                  },
                  vScrollBarEnabled : false,
                });
                if (getPrefs('member_im_id') != memberinfo.member_im_id) {
                  var rong = api.require('rongCloud2');
                  rong.clearMessagesUnreadStatus({
                    conversationType : 'PRIVATE',
                    targetId : memberinfo.member_im_id
                  }, function(ret, err) {
                  })
                }
              }

            }

        });
    }

</script>
</html>
